package nc.pub.hrpbm.refs;


import nc.ui.bd.ref.AbstractRefModel;

/**
 * 四级项目翻译
 */
public class sjXMReferModel extends AbstractRefModel {
    public sjXMReferModel(){
        super();
        this.reset();
    }

    /**
     * 初始化 void
     */
    public void reset() {
        setRefNodeName("四级项目");
        // 编码
        String[] fieldcode = new String[] {"hopbillcode","name"};
        // 名称
        String[] fieldname = {"编码","名称"};
        // 隐藏字段
        String[] hiddenFieldCode = new String[] {"pk_sjxm"};
        setFieldCode(fieldcode);
        setFieldName(fieldname);
        setHiddenFieldCode(hiddenFieldCode);
        setPkFieldCode("pk_sjxm");
        setRefCodeField("hopbillcode");
        setRefNameField("name");
        setTableName("hrpbm_sjxmh");
        setRefTitle("四级项目");
        setResourceID("sjxm");
        resetFieldName();
    }


    @Override
    protected String getEnvWherePart() {
        return "(pk_group = '" + getPk_group() + "' and isnull(dr,0)=0 ) ";
    }

    @Override
    public String buildBaseSql(String patch, String[] columns, String[] hiddenColumns, String tableName, String whereCondition) {
        return super.buildBaseSql(patch, columns, hiddenColumns, tableName, whereCondition);
    }

    public String getPkFieldCode() {
        return "pk_sjxm";
    }

    public String getTableName() {
        return "hrpbm_sjxmh";
    }
}
